<!DOCTYPE html>
<html>
  <head>
    <!-- <script src="./myscript.js"></script> -->
    <>
      class Animal {
        constructor(name) {
          this.name = name;
        }

        speak() {
          console.log(`${this.name} makes a sound.`);
        }
      }

      class Dog extends Animal {
        constructor(name, breed) {
          super(name);
          this.breed = breed;
        }

        speak() {
          alert(`${this.name} 汪汪汪的在叫.`);
        }
      }

      const myDog = new Dog("来福", "毛皮的颜色金色");
      myDog.speak(); // 输出：来福 汪汪汪的在叫.
    </script>
  </head>
  <body></body>
</html>
